﻿@model IEnumerable<Asset_Management.Models.Contract>

@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table>
    <tr>
        <th>
            ContractID
        </th>
        <th>
            @Html.ActionLink("Title", "Index", new {sortOrder = ViewBag.TitleSortParm})
        </th>
        <th>
            @Html.ActionLink("ContractNumber", "Index", new {sortOrder = ViewBag.ContractNumberSortParm})
        </th>
        <th>
            @Html.ActionLink("DateSigned", "Index", new {sortOrder = ViewBag.DateSignedSortParm})
        </th>
        <th>
            @Html.ActionLink("InputDate", "Index", new {sortOrder = ViewBag.InputDateSortParm})
        </th>
        <th>
            @Html.ActionLink("SignedBy", "Index", new {sortOrder = ViewBag.SignedBySortParm})
        </th>
        <th>
             @Html.ActionLink("PriceContract", "Index", new {sortOrder = ViewBag.PriceContractSortParm})
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.ContractID)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Title)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.ContractNumber)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.DateSigned)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.InputDate)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.SignedBy)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.PriceContract)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.ContractID }) |
            @Html.ActionLink("Details", "Details", new { id=item.ContractID }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.ContractID })
        </td>
    </tr>
}

</table>
